﻿<Page x:Class="SGT.Views.ABMMercaderiasView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        mc:Ignorable="d"
        DataContext="{Binding ABMMercaderias, Source={StaticResource Locator}}" d:DesignHeight="460" d:DesignWidth="559">
    
    <Page.Resources>
        <ResourceDictionary>
            <Style    TargetType="Label">
                <Setter Property="FontSize"  Value="14" />
            </Style>
        </ResourceDictionary>
    </Page.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="138*" />
            <RowDefinition Height="322*" />
        </Grid.RowDefinitions>
        <GroupBox Header="Modificar mercaderia" Name="grpMercaderia">
                <Grid >
                    <Grid.RowDefinitions>
                        <RowDefinition Height="68*" />
                        <RowDefinition Height="68*" />
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="10*" />
                        <ColumnDefinition Width="20*" />
                    </Grid.ColumnDefinitions>
                    
                    <Label x:Name="txtNombre" Content="Mercaderia">
            </Label>
            <Label x:Name="txtDensidad" Content="Densidad" Grid.Row="1">
            </Label>
            <TextBox Grid.Column="1" Name="textBox1" Text="{Binding Path=MercaderiaSeleccionada.Nombre}" />
            <TextBox Grid.Column="1" Grid.Row="1" Name="textBox2" Text="{Binding Path=MercaderiaSeleccionada.Densidad}" />
        </Grid>
    </GroupBox>
    <DataGrid AutoGenerateColumns="False" Name="dataGrid1" ItemsSource="{Binding Path=Mercaderias,Mode=TwoWay}" SelectedItem="{Binding Path=MercaderiaSeleccionada}" Grid.Row="1" IsReadOnly="True">
                <DataGrid.Columns>
                    <DataGridTextColumn Header="Mercaderia" Binding="{Binding Path=Nombre}" Width="20*" />
                    <DataGridTextColumn Header="Densidad" Binding="{Binding Path=Densidad}" Width="20*" />
                </DataGrid.Columns>
            </DataGrid>
        
    </Grid>
</Page>